/*
 * Split.h
 *
 *  Created on: 2010-mar-15
 *      Author: he huang
 */

#ifndef SPLIT_H_
#define SPLIT_H_

#include <omnetpp.h>

typedef enum Dimension{
	X = 0,
	Y = 1
} Dim;

typedef enum Side{
	INC = 0,
	DEC = 1,
	BOTH = 2
} Side;

class Split {
public:
	Split(double coordinate, Dim dimension, Side side):_coordinate(coordinate),_dimension(dimension),_side(side){}

	Split(const Split &split):_coordinate(split._coordinate),_dimension(split._dimension),_side(split._side){}

    double getCoordinate() const
    {
        return _coordinate;
    }

    void setCoordinate(double coordinate)
    {
        this->_coordinate = coordinate;
    }

    Dim getDimension() const
    {
        return _dimension;
    }

    void setDimension(Dim dimension)
    {
        this->_dimension = dimension;
    }

    Side getSide() const
    {
        return _side;
    }

    void setSide(Side _side)
    {
        this->_side = _side;
    }

    friend std::ostream& operator<<(std::ostream& os, const Split& s);

	double _coordinate; // coordinates of the splitting line
	Dim _dimension; // on which dimension is the splitting line
	Side _side;		// on which side

};

#endif /* SPLIT_H_ */

